<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>模拟事件的发生</title>
		<script src="js/jquery-1.12.4.js" type="text/javascript"></script>
		
	</head>
	
	<body>
		<input type="button" value="B1">
		<input type="button" value="B2">
		<input type="button" value="B3">
		<input type="button" value="Trigger">
		
		
		<script type="text/javascript">
			$(function(){
				var $Bs = $('input:lt(3)');
				$Bs.click(function(e){
					console.log($(e.target).val());
				});
				
				/// 1. 模拟触发事件$(...).trigger('事件名')
				// $('input:eq(3)').click(function(){
				// 	$Bs.trigger('click');
				// });
				
				// $(...).事件名() --> 触发事件
				$('input:eq(3)').click(function(e){
					$Bs.click();
				});
			});
		</script>
	</body>
</html>
